<template>
  <div class="page_card_card">
    <div class="page_card_info" :style="blog.imgSrc && blog.imgSrc !== '' ? 'width: 65%':'width: 100%;'">
      <div class="page_card_info_title f2">
        {{ blog.title }}
      </div>
      <div class="page_card_info_time mini">
        <span class="el-icon-time"></span>
        {{ blog.lastUpdateTime }}
      </div>
      <div class="page_card_info_desc">
        <div class="page_card_info_desc-words f1">{{ blog.desc }}</div>
      </div>
      <div class="page_card_info_other mini">
        <div class="page_card_info_other_read inline">
          <span class="el-icon-collection"></span>
          {{ blog.read }}
        </div>
        <div class="page_card_info_other_like inline">
          <span class="el-icon-lollipop"></span>
          {{ blog.like }}
        </div>
        <div class="page_card_info_op">
          <button class="learn-more">
            <span class="circle" aria-hidden="true">
              <span class="icon arrow"/>
            </span>
            <span class="button-text">阅读全文</span>
          </button>
        </div>
      </div>
    </div>
    <div class="page_card_image" v-if="blog.imgSrc && blog.imgSrc !== ''">
      <div class="page_card_image_content">
        <img style="width: 100%; height: 100%" :src="blog.imgSrc" alt="">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "BlogCardStyle2",
  props: {
    blog: {
      type: Object
    }
  }
}
</script>

<style scoped>
.page_card_card {
  position: relative;
  width: 85%;
  height: 175px;
  min-width: 200px;
  margin: 20px auto 0 auto;
  transition: all 500ms;
  border: 2px dashed rgba(0, 0, 0, 0.05);
  border-radius: 5px;
  overflow: hidden;
}
.page_card_card:hover{
  border: 2px dashed rgba(0, 0, 0, 0.25);
}

.page_card_image {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 35%;
  overflow: hidden;
}

.page_card_image_content {
  position: absolute;
  width: 80%;
  height: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 100px;
  overflow: hidden;
  transition: 0.5s;
}
.page_card_image_content:hover{
  border-radius: 5px;
}

.page_card_info {
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  height: 100%;
  overflow: hidden;
  text-align: left;
  padding-left: 10px;
}

.page_card_info_title {
  height: 40px;
  line-height: 40px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-weight: bolder;
}

.page_card_info_time {
  height: 25px;
  line-height: 20px;
}

.page_card_info_desc {
  height: 70px;
}

.page_card_info_desc-words {
  margin-top: 35px;
  transform: translateY(-50%);
  max-height: 70px;
  line-height: 23px;
  text-indent: 2em;
  overflow-y: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page_card_info_op {
  position: absolute;
  bottom: 5px;
  right: 10px;
}

.page_card_info_other {
  position: absolute;
  left: 10px;
  bottom: 0;
  height: 22px;
  line-height: 20px;
  width: calc(100% - 20px);
}

.page_card_info_other_read {

}

.page_card_info_other_like {
  margin-left: 10px;
}

button {
  position: relative;
  display: inline-block;
  cursor: pointer;
  outline: none;
  border: 0;
  vertical-align: middle;
  text-decoration: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
}

button.learn-more {
  width: 100px;
  height: auto;
}

button.learn-more .circle {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: relative;
  display: block;
  margin: 0;
  width: 30px;
  height: 30px;
  border-radius: 26px;
  background: rgb(234, 185, 101);
}

button.learn-more .circle .icon {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  background: rgba(0, 0, 0, 0.1);
}

button.learn-more .circle .icon.arrow {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  left: 1px;
  width: 17px;
  height: 2px;
  background: none;
}

button.learn-more .circle .icon.arrow::before {
  position: absolute;
  content: "";
  top: -5px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

button.learn-more .button-text {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  left: 25px;
  right: 0;
  bottom: 0;
  color: rgba(0, 0, 0, 0.4);
  font-weight: 700;
  text-align: center;
  line-height: 30px;
}

button:hover .circle {
  width: 100%;
}

button:hover .circle .icon.arrow {
  background: #fff;
  transform: translate(10px, 0);
}

button:hover .button-text {
  color: #fff;
}
</style>